<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
</head>
<body>
<ul></ul>




<script>
	var conList = {
		items: 68,
		project: [ {
			className: "project1",
			lesson: '第一课',
			list: [
				{
					title: "控制Div属性",
					url: "lesson1/01.html"
				},
				{
					title: "网页换肤",
					url: "lesson1/02.html"
				},
				{
					title: "函数接收参数并弹出",
					url: "lesson1/03.html"
				}
			]
		},
		{
			className: "project2",
			lesson: '第二课',
			list: [
				{
					title: "百度输入法",
					url: "lesson2/01.html"
				},
				{
					title: "点击Div，显示其innerHTML",
					url: "lesson2/02.html"
				},
				{
					title: "求出数组中所有数字的和",
					url: "lesson2/03.html"
				},
				{
					title: "判断数字是否为两位数",
					url: "lesson2/04.html"
				}
			]
		},
		{
			className: "project3",
			lesson: '第三课',
			list: [
				{
					title: "用typeof查看数据类型",
					url: "lesson3/01.html"
				},
				{
					title: "用parseInt解析数字，并求和",
					url: "lesson3/02.html"
				},
				{
					title: "累加按钮，自加1",
					url: "lesson3/03.html"
				}
			]
		} ]
	};
</script>

<script>
	var ul = document.getElementsByTagName( "ul" )[ 0 ],
		str = '';
	
	for ( var i = 0; i < conList.project.length; i++ ) {
		var item = conList.project[ i ];
		str += '<li class="' + item.className + '">';
		str +=	'<dl>';
		str +=		'<dt>' + item.lesson + '('+ item.list.length +')</dt>';
		for ( var j = 0; j < item.list.length; j++ ) {
			var list = item.list[ j ],
				index = j + 1;
			str +=	'<dd>' + index + '.<a href="' + list.url + '">' + list.title + '</a></dd>';
		}
		str +=	'</dl>';
		str += "</li>";
	}

	ul.innerHTML = str;
</script>
</body>
</html>